# CLK和Rest
set_location_assignment PIN_E1 -to Clk
set_location_assignment PIN_M1 -to Rst_n

set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Clk
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Rst_n

# UART
set_location_assignment PIN_A6 -to uart_tx
set_location_assignment PIN_B5 -to uart_rx

set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to uart_tx
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to uart_rx

# Button
set_location_assignment PIN_M16 -to Key0
set_location_assignment PIN_E15 -to Key1
set_location_assignment PIN_E16 -to Key2

set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Key0
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Key1
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Key2

# LED
set_location_assignment PIN_A2 -to Led0
set_location_assignment PIN_B3 -to Led1
set_location_assignment PIN_A4 -to Led2
set_location_assignment PIN_A3 -to Led3

set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Led0
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Led1
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Led2
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to Led3

# TFT
set_location_assignment PIN_K11 -to TFT_HS
set_location_assignment PIN_J14 -to TFT_VS
set_location_assignment PIN_J15 -to TFT_CLK
set_location_assignment PIN_J11 -to TFT_DE
set_location_assignment PIN_J12 -to TFT_PWM

set_location_assignment PIN_P16 -to TFT_RGB[15]
set_location_assignment PIN_N15 -to TFT_RGB[14]
set_location_assignment PIN_R16 -to TFT_RGB[13]
set_location_assignment PIN_P15 -to TFT_RGB[12]
set_location_assignment PIN_N13 -to TFT_RGB[11]
set_location_assignment PIN_L12 -to TFT_RGB[10]
set_location_assignment PIN_K12 -to TFT_RGB[9]
set_location_assignment PIN_L13 -to TFT_RGB[8]
set_location_assignment PIN_M12 -to TFT_RGB[7]
set_location_assignment PIN_L14 -to TFT_RGB[6]
set_location_assignment PIN_N16 -to TFT_RGB[5]
set_location_assignment PIN_J16 -to TFT_RGB[4]
set_location_assignment PIN_K15 -to TFT_RGB[3]
set_location_assignment PIN_K16 -to TFT_RGB[2]
set_location_assignment PIN_J13 -to TFT_RGB[1]
set_location_assignment PIN_L15 -to TFT_RGB[0]

set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_CLK
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_DE
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_PWM
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_HS
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_VS

set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[0]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[1]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[2]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[3]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[4]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[5]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[6]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[7]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[8]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[9]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[10]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[11]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[12]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[13]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[14]
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to TFT_RGB[15]
